package day10.Exer;

public class Circle extends Diagram {
    private double radius;
    static  double PI=3.14;

    public Circle(String name,double radius) {
        super(name);
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    @Override
    public double getarea() {
        return PI*radius*radius;
    }

    @Override
    public double getperimeter() {
        return 2*PI*radius;
    }
}
